package com.pinda.service.impl;


import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.pinda.base.entity.PdTruckDriver;
import com.pinda.base.vo.TruckDriverTheTruckMessageVo;
import com.pinda.base.vo.TruckDriverVo;
import com.pinda.commonutils.Page;
import com.pinda.mapper.PdTruckDriverMapper;
import com.pinda.service.IPdTruckDriverService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 司机表 服务实现类
 * </p>
 *
 * @author author
 * @since 2023-06-26
 */
@Service
public class PdTruckDriverServiceImpl extends ServiceImpl<PdTruckDriverMapper, PdTruckDriver> implements IPdTruckDriverService {


    @Autowired
    PdTruckDriverMapper pdTruckDriverMapper;


    @Override
    public PageInfo queryPageTruckDriver(Page<PdTruckDriver> page) {
        PageHelper.startPage(page.getPageNum(),page.getPageSize());
        PageInfo<TruckDriverVo> pdTruckDriverPageInfo = new PageInfo<TruckDriverVo>(this.pdTruckDriverMapper.queryPageTruckDriver(page.getSearch()));
        return pdTruckDriverPageInfo;
    }

    @Override
    public TruckDriverTheTruckMessageVo queryTruckDriverTheTruckMessage(String id) {

        return this.pdTruckDriverMapper.queryTruckDriverTheTruckMessage(id);
    }
}
